<?php
/**
 * Created by PhpStorm.
 * User: 周超
 * Date: 2016/11/17
 * Time: 17:50
 */

namespace App\Http\Routes;

use Illuminate\Contracts\Routing\Registrar;
class ProductsRoute
{
    public function map(Registrar $router)
    {
        $router->group(['middleware' => 'api',
            'prefix' => 'api/products',], function ($router) {
            $router->post('all',['uses' =>'Api\ProductController@postAllProducts']);
            $router->post('collection',['uses' =>'Api\ProductController@postGetProductsByCollectionId']);
            $router->post('modify-product',['uses' =>'Api\ProductController@postModifyProduct']);
            $router->post('shelves',['uses' =>'Api\ProductController@postShelves']);
            $router->post('delete',['uses' =>'Api\ProductController@postDelete']);
            $router->post('detail',['uses' =>'Api\ProductController@postProductDetail']);
            $router->post('product-detail',['uses' =>'Api\ProductController@postProductsDetail']);
            $router->post('parameter-detail',['uses' =>'Api\ProductController@postProductParamters']);
            $router->post('shelves-products',['uses' =>'Api\ProductController@postShelvesProducts']);
            $router->post('out-shelves-products',['uses' =>'Api\ProductController@postOutShelvesProducts']);
            $router->post('list',['uses' =>'Api\ProductController@postList']);
            $router->post('common-user-product-detail',['uses' =>'Api\ProductController@postCommonUserProductDetail']);
            $router->post('creation',['uses' =>'Api\ProductController@postCreation']);
            $router->post('common-user-creation',['uses' =>'Api\ProductController@postCommonUserCreation']);
            $router->post('save-publication',['uses' =>'Api\ProductController@postSavePublication']);
            $router->post('common-user-save-publication',['uses' =>'Api\ProductController@postCommonUserSavePublication']);
            $router->post('drafts',['uses' => 'Api\ProductController@postDrafts']);
            $router->post('drafts/list',['uses' => 'Api\ProductController@postDraftList']);
            $router->post('drafts/delete',['uses' => 'Api\ProductController@postDeleteDraft']);
            $router->post('drafts/shelves',['uses' => 'Api\ProductController@postDraftShelves']);
            $router->post('drafts/edit',['uses' => 'Api\ProductController@postDraftEdit']);
        });
    }
}